<template>
  <div class="home">
    <div class="hander">
      <div class="hander_content">
        <div class="hander_info">
          <div class="avitar" @click="$router.push('/info')">
            <img
              alt=""
              class="user_img"
              :src="userInfo.avatar"
            /><!----><img
              src="/assets/img/皇冠-2 拷贝@2x.ca9087bc.png"
              alt=""
              class="vip-logo"
            />
          </div>
          <div class="phone">
            {{userInfo.nickname}}
            <img
              src=""
              alt=""
              class="xiugai"
            />
          </div>
          <div class="right">去约课</div>
        </div>
        <div class="hander_mine">
          <ul>
            <li>
              <p class="count">0</p>
              <p class="title">我的特色课</p>
              <p class="xq">已购特色课程的学习</p>
            </li>
            <li>
              <p class="count">0</p>
              <p class="title">一对一辅导</p>
              <p class="xq">我的一对一老师辅导</p>
            </li>
            <li>
              <p class="count">0.00</p>
              <p class="title">剩余学习币</p>
              <p class="xq">查看剩余学习币</p>
            </li>
          </ul>
        </div>
      </div>
    </div>
    <div class="box">
      <div>
        <img
          src=""
          alt=""
          class="box_img"
        />
      </div>
      <div class="box_content">
        <p>邀请好友注册APP，享多重好礼</p>
        <p class="content_ms">显示特惠，多邀多得</p>
      </div>
      <van-icon
        color="#fff"
        style="margin-right: 0.533rem"
        size=".533rem"
        name="arrow"
      />
    </div>
    <div class="menu_box">
      <ul>
        <li>
          <p class="title">课程相关</p>
          <div class="item-box">
            <div class="item">
              <img
                src=""
                class="icon-teacher"
              />
              <p>关注的老师</p>
            </div>
            <div class="item">
              <img
                src=""
                class="icon-collect"
              />
              <p>我的收藏</p>
            </div>
          </div>
        </li>
        <li>
          <p class="title">订单相关</p>
          <div class="item-box">
            <div class="item">
              <img
                src=""
                class="icon-order"
              />
              <p>课程订单</p>
            </div>
            <div class="item">
              <img
                src=""
                class="icon-order"
              />
              <p>会员订单</p>
            </div>
            <div class="item">
              <img
                src=""
                class="icon-order"
              />
              <p>约课订单</p>
            </div>
          </div>
        </li>
        <li>
          <p class="title">我的账户</p>
          <div class="item-box">
            <div class="item">
              <img
                src=""
                class="icon-coupon"
              />
              <p>优惠券</p>
              <span></span>
            </div>
            <div class="item">
              <img
                src=""
                class="icon-card"
              />
              <p>学习卡</p>
            </div>
            <div class="item">
              <img
                src=""
                class="icon-vip"
              />
              <p>会员</p>
            </div>
          </div>
        </li>
        <li>
          <p class="title">自助服务</p>
          <div class="item-box">
            <div class="item">
              <img
                src=""
                class="icon-news"
              />
              <p>我的消息</p>
              <span></span>
            </div>
            <div class="item">
              <img
                src=""
                class="icon-mail"
              />
              <p>意见反馈</p>
            </div>
            <div class="item">
              <img
                src=""
                class="icon-custom"
              />
              <p>在线客服</p>
            </div>
            <div class="item">
              <img
                src=""
                class="icon-custom"
              />
              <p>设置</p>
            </div>
          </div>
        </li>
      </ul>
    </div>
    <!---->
  </div>
</template>
  
  <script>
    import { getUserInfo } from "../request/http"
export default {
  data(){
    return {
      userInfo:[]
    }
  },
  created(){
    getUserInfo().then(res=>{
      console.log(res);
      this.userInfo = res.data.data
    })
  }
};
</script>
  
  <style scoped lang="scss">
.home{
  background-color: #fff;
}

.hander {
  width: 100%;
  height: 5.813rem;
  background: url(http://xl.9yuecloud.com/assets/img/user_bg.ab306a5c.png)
    no-repeat top;
  background-size: 100%;
  position: relative;

  .hander_content {
    position: absolute;
    width: 90%;
    height: 4.613rem;
    background: #fff;
    left: 0.48rem;
    top: 1.2rem;
    border-radius: 0.133rem;
    .hander_info {
      width: 95%;
      height: 1.867rem;
      padding-top: 0.267rem;
      margin-left: 0.4rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      .avitar {
        width: 1.333rem;
        height: 1.333rem;
        border: 1px solid #777;
        border-radius: 100%;
        overflow: hidden;
        .user_img {
          width: 100%;
          height: 100%;
        }
      }
      .phone {
        width: 75%;
        float: left;
        font-size: 0.453rem;
        .xiugai {
          width: 0.4rem;
          height: 0.4rem;
        }
      }
      .right {
        position: absolute;
        right: 0;
        width: 1.467rem;
        height: 0.667rem;
        background: #eb6100;
        color: #fff;
        text-align: center;
        line-height: 0.667rem;
        border-top-left-radius: 0.213rem;
        border-bottom-left-radius: 0.213rem;
      }
    }
    .hander_mine {
      height: 2.133rem;
      width: 90%;
      margin: 0 auto;
      ul {
        display: flex;
        justify-content: space-between;
        align-items: center;
        li {
          border: 1px solid #f1f1f1;
          width: 32%;
          height: 100%;
          text-align: center;
          p {
            line-height: 0.133rem;
          }
        }
        .count {
          color: #eb6100;
          font-size: 0.507rem;
        }
        .title {
          font-size: 0.4rem;
        }
        .xq {
          line-height: 0.4rem;
          font-size: 0.32rem;
          color: #777;
          overflow: hidden;
          text-overflow: ellipsis;
        }
      }
    }
  }
}

.box {
  width: 90%;
  height: 1.173rem;
  margin: 0.4rem auto;
  background: url()
    no-repeat;
  background-size: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  .box_img {
    width: 0.533rem;
    height: 0.533rem;
    margin-left: 0.533rem;
  }
  .box_content {
    text-align: left;
    color: #fff;
    width: 70%;
    p {
      line-height: 0.133rem;
    }
    .content_ms {
      font-size: 0.293rem;
    }
  }
}

.menu_box {
  width: 90%;
  margin: 0 auto;
  padding-bottom: 1.333rem;
  li {
    border-bottom: 1px solid #eee;
  }
  .title {
    font-family: PingFangSC-Medium;
    font-size: 0.427rem;
    color: #333;
    line-height: 0.267rem;
  }
  .item-box {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    .item {
      display: -webkit-box;
      display: -webkit-flex;
      display: flex;
      justify-content: flex-end;
      align-items: center;
      flex-direction: column;
      width: 25%;
      height: 1.6rem;
      text-align: center;
      padding-bottom: 0.533rem;
      img {
        width: 0.533rem;
        height: 0.533rem;
        display: inline-block;
      }
    }
  }
}
</style>